package com.dyh.service.serviceImpl;
import com.dyh.dao.policyDao;
import com.dyh.po.policy;
import com.dyh.service.policyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;


@Service
@Transactional
public class policyServiceImpl implements policyService{
    @Autowired
    policyDao policydao;

    @Override
    public List<policy> findAllPolicy() {
        return policydao.findAllPolicy();
    }

    @Override
    public policy findPolicyByYear(String year) {
        return policydao.findPolicyByYear(year);
    }

    @Override
    public int editPolicy(String year,String topmoney,String toppercent) {
        return policydao.editPolicy(year,topmoney,toppercent);
    }

    @Override
    public int addPolicy(String year, String topmoney, String toppercent) {
        return policydao.addPolicy(year,topmoney,toppercent);
    }

    @Override
    public int deletePolicy(String year) {
        return policydao.deletePolicy(year);
    }
}
